home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / FILETAG2.422 < prev    next >
Text File  |  1993-04-15  |  6KB  |  176 lines

  1. Tried to fix all the prolems...
  2. Commander Riker #1 @7751
  3. 3Saturday, April 10, 1993  1 6:50 am
  4. It seems that I had a few errors in the previous release of this mod. I found a
  5. few of them and have re-written them with more detail. I have installed it in
  6. virgin code acording to the mod docs and have found no further problems. Sorry
  7. for the errors that you people have encountered with this mod.
  8.  
  9. Part 1 of 3:
  10. ┌────────────────────────────────────────────────────────────────────────────┐
  11. │ Mod Name: FILETAG2.422           Mod Authors: Commander Riker (1@7751 Ice) │
  12. │ Difficulty: ███▒▒▒▒▒▒                   Date: March 24, 1993               │
  13. │ WWIV Version: 4.22                                                         │
  14. │ Files Affected: XFER.C, XINIT.C, VARDEC.H, COM.C,                          │
  15. │                 VARS.H, FCNS.H, BBSUTL.C, XFEROVL.C (optional)             │
  16. │ Description: This mod allows users to tag files for downloading            │
  17. └────────────────────────────────────────────────────────────────────────────┘
  18.  
  19. ═══[ Disclaimer    ]═══════════════════════════════════════════════════════
  20.  
  21.    None needed, you installed this mod, not me!
  22.  
  23. ═══[ Opening notes ]═══════════════════════════════════════════════════════
  24.  
  25. This is a re-write of the filetag.mod, version 2.2 by Blackbeard. Most of
  26. the credit should go to him as he did an excelent job as far as he took it.
  27. There was a small bug that would not allow the last screen of files available
  28. for tagging. This problem has been solved.(I hope!!) Those of you that have
  29. used Blackbeards file tag mod will notice a few nice extra's.
  30.   Enough talk, on with the show.
  31.  
  32. ╒══════════════════════╕
  33. │        Legend        │    I would suggest doing as much block copying as
  34. ╞══════════════════════╡    possible. I may have forgotten to mark a few
  35. │  + Add Line          │    "{'s" or "}'s". This mod is taken right out
  36. │  - Remove Line       │    of my code here at Starfleet Command so I
  37. │  @ Modify Line       │    know it works.
  38. │  = Existing line     │
  39. │  % Cut by Editor     │
  40. ╘══════════════════════╛
  41.  
  42.  
  43. ═══[ Step 1        ]═══════════════════════════════════════════════════════
  44.  
  45. Back up your source!!!!
  46.         If you do not know how to do that, you do not need to even go any
  47. further.
  48.  
  49. ═══[ Step 2        ]═══════════════════════════════════════════════════════
  50.  
  51. Open up "VARDEC.H", and do these following steps.
  52.  
  53. = #define sysstatus_nscan_file_system 0x0080
  54. = #define sysstatus_funky_colors 0x0100
  55. = #define sysstatus_clr_scrn 0x0200
  56. + #define sysstatus_no_tag 0x1000  /* FT422 */
  57.  
  58. = /* slrec.ability */
  59. = #define ability_post_anony 0x0001
  60. = #define ability_email_anony 0x0002
  61.  
  62. Add this typedef any where you want (if those with low IQ's i will show you a
  63. good spot).
  64.  
  65. + /* Tag record Structure */
  66. + typedef struct {
  67. +         int   directory;
  68. +         char  filename[13];
  69. + } tag_rec;
  70.  
  71. = #define max_buf 1024
  72.  
  73. Then add this define right here:
  74.  
  75. = #define max_buf 1024
  76. = #define MSG_COLOR 13
  77. + #define MAX_FILES 61 /* See note */
  78. = #define MAX_BATCH 50
  79.  
  80. Note: This number represents the maximum screen length a user can have. This
  81. is wwiv's standard size if you have changed this standard, then change this!
  82.  
  83. Close "VARDEC.H"
  84.  
  85. ═══[ Step 3        ]═══════════════════════════════════════════════════════
  86.  
  87. Open "VARS.H" and add these variables.
  88.  
  89. =__EXTRN__ int abortext, already_on, ansiptr, arcling, async_irq, base,
  90. =              bchanged, change_color, charbufferpointer, chatcall,
  91. =              .
  92. =              .
  93. =              .
  94. =              .
  95. =              questused[20], restoring_shrink, save_dos, screenbottom,
  96. =              screenlen, screenlinest, smwcheck, statusfile,
  97. =              sysop_alert, tempio, topdata, topline, two_color,
  98. =              userfile, usernum, useron, use_workspace, using_modem,
  99. @              wfc, x_only, file_ptr, in_tag;
  100.                            ++++++++  ++++++
  101.  
  102. then go down a little futher and add this last var:
  103.  
  104. =__EXTRN__ void far *funcs[25];
  105. =__EXTRN__ char far *scrn;
  106.  
  107. =__EXTRN__ char far *point_shrink;
  108. +__EXTRN__ tag_rec *file_index;  /* FT422 */
  109.  
  110.  
  111. =/* from version.c */
  112. =extern char *wwiv_version;
  113.  
  114. Close "VARS.H"
  115.  
  116. ═══[ Step 4 ]═══════════════════════════════════════════════════════
  117.  
  118. Open up "XINIT.C" and add the following:
  119.  
  120. =  }
  121.  
  122. =  batch=mallocx(MAX_BATCH * sizeof(batchrec), "batch list");
  123. +  file_index=mallocx(MAX_FILES * sizeof(tag_rec),"filetag index");
  124.  
  125. =  read_user(1,&thisuser);
  126.  
  127. Close "XINIT.C"
  128.  
  129. ═══[ Step 5        ]═══════════════════════════════════════════════════════
  130.  
  131. Open up "COM.C", and do the following...
  132.  
  133. Find the void outchr:
  134.  
  135. ==        if ((sysstatus_pause_on_page & thisuser.sysstatus) &&
  136. ==            (lines_listed >= screenlinest - 1)) {
  137. ++          if (in_tag)
  138. ++             tag_files();
  139. ++           else
  140. ==             pausescr();
  141. ==          lines_listed = 0;
  142. @@        } else   /*add the else to the brace */
  143. ++            if ((!(thisuser.sysstatus & sysstatus_no_tag)) && (in_tag) &&
  144. ++             (lines_listed >= screenlinest - 1)) {
  145. ++               tag_files();
  146. ++               lines_listed=0;
  147. ++            }
  148. --            if (!x_only)       /*      \                           */
  149. --            pausescr();        /*       \ delete these four lines  */
  150. --          lines_listed = 0;    /*       / or just comment them out */
  151. --        }                      /*      /                           */
  152. ==      }
  153. ==    } else
  154. ==      out1ch('X');
  155. ==  }
  156. ==  if (chatcall)
  157. ==    setbeep(0);
  158. ==}
  159.  
  160. Close up "COM.C".
  161.  
  162. ═══[ Step 6        ]═══════════════════════════════════════════════════════
  163.  
  164. Open "BBSUTL.C" and modify checka()...
  165.  
  166. = void checka(int *abort, int *next)
  167. = {
  168. =   char ch;
  169. =
  170. +   if (in_tag>=3)
  171. +      *abort=1;
  172. =   while ((!empty()) && (!(*abort)) && (!hangup)) {
  173.  
  174. Close  "BBSUTL.C"
  175.  
  176.